<?php if ($menu): ?>
  <ul class="menu">
    <?php foreach ($menu->items as $item): ?>
          <li <?php if($item->active): ?>class="active"<?php endif; ?>>
              <a href="<?php echo $item->url ?>"><?php echo $item->name ?></a>
          </li>
      <?php endforeach; ?>
  </ul>
<?php endif; ?>

  